﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EzDesk.Project.Service.Tests.Mock;
using EzDesk.EzAppApi.Utility;
using EzDesk.Project.Model;
using EzDesk.Project.Service.Repositories;

namespace EzDesk.Project.Service.Tests
{
    public class ProjectTestBase
    {
        protected IDictionary<string, Guid> SampleUsers;

        public ProjectTestBase()
        {
            SampleUsers = new Dictionary<string, Guid>();

            //"19f1c421-280f-4935-9980-e469175461c2", "龚伟"
            //"0c9d7c0c-04a5-4ae2-97a1-d7bbc38f5c66", "杨裕欣"
            //"ce36c495-38cc-4b7e-875e-364ff8e087b5", "卢春叶"
            
            SampleUsers.Add("卢春叶", new Guid("ce36c495-38cc-4b7e-875e-364ff8e087b5"));
            SampleUsers.Add("杨裕欣", new Guid("0c9d7c0c-04a5-4ae2-97a1-d7bbc38f5c66"));
            SampleUsers.Add("龚伟", new Guid("19f1c421-280f-4935-9980-e469175461c2"));
            SampleUsers.Add("Karin", new Guid("877c3323-17a7-42d1-9d75-402ffc894e63"));
        }


        protected ProjectService GetProjectService()
        {
            //var mock_EzApiClient = new Mock_EzApiClient();
            //var realDbContext = new EzDeskProjectDataContext();
            //return new ProjectService(
            //    mock_EzApiClient,
            //    //new ProjectTeamService(mock_EzApiClient, new ProjectTeamRepository(realDbContext, mock_EzApiClient)),
            //    new ProjectTaskService(),
            //    new ProjectTypeRepository(),
            //    //new ProjectInfoRepository(realDbContext)
            //    new Mock_ProjectInfoRepository(),
            //    new Mock_WorkItemRepository()
            //    );
            return null;
        }

        protected ProjectTaskService GetProjectTaskService()
        {
            return new ProjectTaskService();
        }


        protected IEzApiClient apiClient = new Mock_EzApiClient();

        public static Guid existedTestProjectId = Mock_Storage<BasicInfo>.existedTestProjectId;
        public static Guid testProjectId1 = Mock_Storage<BasicInfo>.testProjectId1;
        public static Guid testProjectId2 = Mock_Storage<BasicInfo>.testProjectId2;

    }
}
